//
//  HRNoviceBootViewController.m
//  Hear
//
//  Created by mac on 2017/4/20.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "HRNoviceBootViewController.h"

@interface HRNoviceBootViewController ()<UIWebViewDelegate,UIScrollViewDelegate>
@property (nonatomic, strong)UIWebView *webView;

@end

@implementation HRNoviceBootViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.automaticallyAdjustsScrollViewInsets = NO;

    
    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, kTopHeight, kFullWidth, kFullHeight-kTopHeight)];
    self.webView.scrollView.delegate = self;
    self.webView.dataDetectorTypes = UIDataDetectorTypeAll;
    self.webView.delegate = self;
    [self.view addSubview:self.webView];
    
    NSURLRequest *req = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:self.requestUrl]];
    [_webView loadRequest:req];
    
    
//    UIButton *leftButton = [UIButton buttonWithType:0];
//    leftButton.size = CGSizeMake(20, 20);
//    [leftButton setImage:[UIImage imageNamed:@"Back-Arrow"] forState:UIControlStateNormal];
//    [leftButton addTarget:self action:@selector(clickMenu) forControlEvents:UIControlEventTouchUpInside];
//    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];
//    self.navigationItem.leftBarButtonItem = leftItem;
}

- (void)clickMenu{
    [self.navigationController popViewControllerAnimated:YES];
}

-(void)dealloc
{
    _webView = nil;
    [_webView removeAllSubviews];
}
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    self.hidesBottomBarWhenPushed = YES;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
